package com.newlink.building.login.mvp.model

import com.newlink.building.login.mvp.contract.Module_Login_RegisterContract
import com.newlink.building.common_base.base.BaseModel
import com.newlink.building.common_base.http.Base_RetrofitHelper
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.KitRegisterRequest
import com.newlink.building.common_base.model.bean.RegisterData
import com.newlink.building.common_base.model.bean.RegisterResultData
import com.newlink.building.common_base.model.bean.ResponseTopData
import com.newlink.building.common_base.model.bean.VerifyCodeRequest
import io.reactivex.Observable

/**
 * Created by xiaodong on 2022/8/24.
 */
class Module_Login_RegisterModel : BaseModel(), Module_Login_RegisterContract.Model {
    override fun register(
        username: String,
        password: String
    ): Observable<HttpResult<RegisterData>> {
        return Base_RetrofitHelper.service.register(username, password)
    }

    override fun kitRegister(request: KitRegisterRequest): Observable<HttpResult<RegisterResultData>> {
        return Base_RetrofitHelper.service.kitRegister(request)
    }

    override fun getVerifyCode(request: VerifyCodeRequest): Observable<HttpResult<ResponseTopData>> {
        return Base_RetrofitHelper.service.getKitVerifyCode(request)
    }
}